package cn.fuxi2022.model.empty.accounts;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 微信消息回复表
 * </p>
 *
 * @author Fuxi
 * @since 2022-10-18 08:27:33
 */
@Getter
@Setter
@TableName("accounts_reply")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class AccountsReply implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "ID不能为空", groups = AccountsReply.Update.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @NotNull(message = "关键字不能为空", groups = {AccountsReply.Save.class, AccountsReply.Update.class})
    @TableField("name")
    private String name;

    @NotNull(message = "内容不能为空", groups = {AccountsReply.Save.class, AccountsReply.Update.class})
    @TableField("content")
    private String content;

    /**
     * 逻辑删除 1（true）已删除， 0（false）未删除
     */
    @JsonIgnore
    @TableLogic(value = "0", delval = "1")
    @TableField("is_deleted")
    private Integer isDeleted;

    /**
     * 创建时间
     */
    @JsonIgnore
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @JsonIgnore
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    public interface Update {
    }

    public interface Save {
    }
}
